class Point
{
	double x;
	double y;
	
	
	public Point (double x, double y)
	{
		this.x=x;
		this.y=y;
	}
	
	public double getDistance (Point p)
	{
		return (Math.sqrt (Math.pow(this.x-p.x, 2) + Math.pow (this.y-p.y, 2)));
	}
	
	public Point getMidPoint (Point p)
	{
		double x2=((this.x+p.x)/2);
		double y2=((this.y+p.y)/2);
		Point p2=new Point (x2, y2);
		return p2;
	}
	
	public double getSlope (Point p)
	{
		return ((p.y-this.y)/(p.x-this.x));
	}
} 	